using System;
using System.Collections.Generic;
using System.Reflection;
using System.Runtime.InteropServices;

using ILRuntime.CLR.TypeSystem;
using ILRuntime.CLR.Method;
using ILRuntime.Runtime.Enviorment;
using ILRuntime.Runtime.Intepreter;
using ILRuntime.Runtime.Stack;
using ILRuntime.Reflection;
using ILRuntime.CLR.Utils;
using System.Linq;

namespace ILRuntime.Runtime.Generated
{
    unsafe class huqiang_Data_LogCmd_Binding
    {
        public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app)
        {
            BindingFlags flag = BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static | BindingFlags.DeclaredOnly;
            MethodBase method;
            FieldInfo field;
            Type[] args;
            Type type = typeof(huqiang.Data.LogCmd);

            field = type.GetField("UnityLog", flag);
            app.RegisterCLRFieldGetter(field, get_UnityLog_0);
            app.RegisterCLRFieldBinding(field, CopyToStack_UnityLog_0, null);
            field = type.GetField("ServiceLog", flag);
            app.RegisterCLRFieldGetter(field, get_ServiceLog_1);
            app.RegisterCLRFieldBinding(field, CopyToStack_ServiceLog_1, null);
            field = type.GetField("RedirectUnityLog", flag);
            app.RegisterCLRFieldGetter(field, get_RedirectUnityLog_2);
            app.RegisterCLRFieldBinding(field, CopyToStack_RedirectUnityLog_2, null);
            field = type.GetField("RedirectServiceLog", flag);
            app.RegisterCLRFieldGetter(field, get_RedirectServiceLog_3);
            app.RegisterCLRFieldBinding(field, CopyToStack_RedirectServiceLog_3, null);


            app.RegisterCLRCreateDefaultInstance(type, () => new huqiang.Data.LogCmd());
            app.RegisterCLRCreateArrayInstance(type, s => new huqiang.Data.LogCmd[s]);

            args = new Type[]{};
            method = type.GetConstructor(flag, null, args, null);
            app.RegisterCLRMethodRedirection(method, Ctor_0);

        }



        static object get_UnityLog_0(ref object o)
        {
            return huqiang.Data.LogCmd.UnityLog;
        }

        static StackObject* CopyToStack_UnityLog_0(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = huqiang.Data.LogCmd.UnityLog;
            __ret->ObjectType = ObjectTypes.Integer;
            __ret->Value = result_of_this_method;
            return __ret + 1;
        }

        static object get_ServiceLog_1(ref object o)
        {
            return huqiang.Data.LogCmd.ServiceLog;
        }

        static StackObject* CopyToStack_ServiceLog_1(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = huqiang.Data.LogCmd.ServiceLog;
            __ret->ObjectType = ObjectTypes.Integer;
            __ret->Value = result_of_this_method;
            return __ret + 1;
        }

        static object get_RedirectUnityLog_2(ref object o)
        {
            return huqiang.Data.LogCmd.RedirectUnityLog;
        }

        static StackObject* CopyToStack_RedirectUnityLog_2(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = huqiang.Data.LogCmd.RedirectUnityLog;
            __ret->ObjectType = ObjectTypes.Integer;
            __ret->Value = result_of_this_method;
            return __ret + 1;
        }

        static object get_RedirectServiceLog_3(ref object o)
        {
            return huqiang.Data.LogCmd.RedirectServiceLog;
        }

        static StackObject* CopyToStack_RedirectServiceLog_3(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = huqiang.Data.LogCmd.RedirectServiceLog;
            __ret->ObjectType = ObjectTypes.Integer;
            __ret->Value = result_of_this_method;
            return __ret + 1;
        }



        static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject* __ret = ILIntepreter.Minus(__esp, 0);

            var result_of_this_method = new huqiang.Data.LogCmd();

            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
        }


    }
}
